package com.example.dou2204.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.dou2204.R;
import com.example.dou2204.entity.MessageEntity;

import java.util.List;

public class MessageAdapter extends BaseQuickAdapter<MessageEntity, BaseViewHolder> {
    public MessageAdapter(int layoutResId, @Nullable List<MessageEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, MessageEntity entity) {
        holder.setText(R.id.tv,entity.getUsername()+":"+entity.getMsg());
    }
}
